{% extends "FOSUserBundle::layout.html.twig" %}

{% trans_default_domain 'FOSUserBundle' %}

{% block stylesheets %}
<style type="text/css">
  body {
    padding-top: 40px;
    padding-bottom: 40px;
    background-color: #f5f5f5;
  }

  .form-signin {
    max-width: 300px;
    padding: 19px 29px 29px;
    margin: 0 auto 20px;
    background-color: #fff;
    border: 1px solid #e5e5e5;
    -webkit-border-radius: 5px;
       -moz-border-radius: 5px;
            border-radius: 5px;
    -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
       -moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
            box-shadow: 0 1px 2px rgba(0,0,0,.05);
  }
  .form-signin .form-signin-heading,
  .form-signin .checkbox {
    margin-bottom: 10px;
  }
  .form-signin input[type="text"],
  .form-signin input[type="password"] {
    font-size: 16px;
    height: auto;
    margin-bottom: 15px;
    padding: 7px 9px;
  }
</style>
{% endblock stylesheets %}

{% block fos_user_content %}
<div class="container">
    <form class="form-signin" action="{{ path("fos_user_security_check") }}" method="post">
        {% if error %}<div class="alert alert-error">{{ error|trans }}</div>{% endif %}
        <input type="hidden" name="_csrf_token" value="{{ csrf_token }}" />
        <h2 class="form-signin-heading">后台管理系统</h2>
        <input type="text" name="_username" value="{{ last_username }}" required="required" class="input-block-level" placeholder="用户名">
        <input type="password" name="_password" required="required" class="input-block-level" placeholder="密码">
        <label class="checkbox">
            <input type="checkbox" name="_remember_me" value="on"> {{ 'security.login.remember_me'|trans }}
        </label>
        <input type="submit" class="btn btn-large btn-primary" name="_submit" value="{{ 'security.login.submit'|trans }}" />
    </form>

</div>
{% endblock fos_user_content %}
